<template>
  <div class="subject">
    <span class="sum">{{ ids.length }}</span>
    <van-nav-bar
      title="面试题"
      left-arrow
      right-text="答题卡"
      @click-left="onBack"
      @click-right="onCard"
    >
      <template #left>
        <i class="arrow iconfont iconbtn_nav_back"></i>
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
import bus from '../../../utils/bus'

export default {
  data () {
    return {
      content: {},
      ids: [],
      details: []
    }
  },
  created () {
    bus.$on('idsget', item => {
      this.ids = item
    })
  },
  methods: {
    onBack () {
      this.$dialog
        .confirm({
          message: '确认退出？'
        })
        .then(() => {
          this.$router.go(-1)
        })
    },
    onCard () {
      // 答题卡
      // this.$refs.answerSheet.show = true

      bus.$emit('isShow', true)
    },
    // 子父
    getids (value) {
      this.ids = value
      // console.log(this.ids)
    }
  }
}
</script>

<style lang="less" scoped>
.subject {
  position: relative;
  .sum {
    position: absolute;
    top: 5px;
    left: 59%;
    font-size: 12px;
    z-index: 2;
  }

  .arrow {
    font-size: 40px;
  }
}

/deep/.van-nav-bar__left,
.van-nav-bar__right {
  padding: 0 4px;
}
/deep/.van-nav-bar__text {
  color: #000;
}
/deep/.van-nav-bar__title {
  font-size: 22px;
}
</style>
